package com.block.storage.enums;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;

@Getter
public enum BizTypeEnum {


    APPROVE("APPROVE", "授权", "/approve/", 1),
    MERCHANT("MERCHANT", "商户", "/merchant/", 0),
    ;

    String type;

    String name;

    String path;

    Integer priFlag;

    BizTypeEnum(String type, String name, String path, Integer priFlag){
        this.type = type;
        this.name = name;
        this.path = path;
        this.priFlag = priFlag;
    }

    public static BizTypeEnum getEntityByBizType(String bizType){
        for (BizTypeEnum typeEnum : values()) {
            if (StrUtil.equals(typeEnum.getType(), bizType)){
                return typeEnum;
            }
        }
        return null;
    }


}


